import img from '@/assets/image/home.png';
import styles from '@/pages/writeHome/index.less';
import { history } from '@@/core/history';
import { PlusOutlined } from '@ant-design/icons';
import { Button } from 'antd';
import { stringify } from 'querystring';
import React from 'react';

const EmptyComponent: React.FC = () => {
  const write = (item) => {
    let query = '';
    if (item) {
      query = stringify({ id: item.document_uuid || '' });
    }
    history.push({
      pathname: `/conversation?${query}`,
    });
  };
  return (
    <div className={styles.emptyContent}>
      <h2>文章写作神器</h2>
      <div className={styles.text}>
        文章写作神器，是你A智能办公助手，快速撰写文章解决方案，你告诉A你的想法
      </div>
      <div className={styles.text}>AI会自动生成完整文档，让你大大提高工作效率。</div>
      <div className={styles.more} onClick={() => write()}>
        了解更多
      </div>
      <img className={styles.homeImg} src={img} alt="" />
      <Button type="primary" icon={<PlusOutlined />} onClick={() => write()}>
        新建文档
      </Button>
    </div>
  );
};
export default EmptyComponent;
